
public class Clock{

	int tickLength = 100;
	long oldTick;
	
	public void start(){oldTick = System.currentTimeMillis();}
		
	public void endTick(){

		try {
			Thread.sleep(oldTick+tickLength - System.currentTimeMillis());
		} catch (InterruptedException e) {}
		
		oldTick =System.currentTimeMillis();
	}	
}
